package ui;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.event.ActionListener;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

@SuppressWarnings("serial")
public class UserPanel extends JPanel {
	JButton buttonDeposit;
	JButton buttonWithdraw;
	JButton buttonTransfer;
	JButton buttonHome;
	public UserPanel(UserUI userui) {
		
		
		setBackground(Color.decode("#3e3e3e"));
		setLayout(null);

		setPreferredSize(new Dimension(150, 600));
		
	    ImageIcon atmLogoIcon = new ImageIcon("gfx/atmLogo.png");
	    JLabel atmLogo = new JLabel(atmLogoIcon);
	    atmLogo.setBounds(0, 0, 150, 48);
		add(atmLogo);
		
		// AVATAR ICON
	    ImageIcon avatarIcon = new ImageIcon("gfx/unknown-128.png");
	    JLabel userAvatar = new JLabel(avatarIcon);
	    userAvatar.setBounds(11, 59, 128, 128);
	   
	    //Home Button
	  
	    
		
	    // MENU
		buttonTransfer = new JButton("Transfer");
		buttonTransfer.setBounds(5, 210, 140, 30);
		buttonTransfer.setActionCommand("Transfer");
		
		buttonDeposit = new JButton("Deposit");
		buttonDeposit.setBounds(5, 240, 140, 30);
		buttonDeposit.setActionCommand("Deposit");
		
		buttonWithdraw = new JButton("Withdraw");
		buttonWithdraw.setBounds(5, 270, 140, 30);
		buttonWithdraw.setActionCommand("Withdraw");
		
		buttonHome = new JButton("Home");
		buttonHome.setBounds(5, 485, 140, 30);
		buttonHome.setActionCommand("Home");
		
		
		
		
		
	    // LOGIN INFORMATION
	    //JLabel loginInfo = new JLabel("Logged in as Administrator");
	    //loginInfo.setBounds(10, 150, 130, 60);
		
		

		
		
		add(buttonTransfer);
		add(buttonDeposit);
		add(buttonWithdraw);
		add(buttonHome);

		add(userAvatar);
//		add(loginInfo);
		
		
	}
	public void addACList(ActionListener ac){
		buttonDeposit.addActionListener(ac);
		buttonWithdraw.addActionListener(ac);
		buttonTransfer.addActionListener(ac);
		buttonHome.addActionListener(ac);
	}
	
}
